package com.shanjupay.common.config.redis;


/**
 * @author dudu
 */
public class RedisStaticKey {


    private static final String CAPTCHA_PREFIX = "Captcha:";

    private static final String SESSION_PREFIX = "Session-blue-df-bizmgr:";

    public static final String SESSION_ID = "s_sessionId";
    public static final String SESSION_CURRENT_USER_ID = "s_current_user_id";
    public static final String SESSION_CURRENT_USER_ORG_ID = "s_current_user_org_id";
    public static final String SESSION_CURRENT_USER_ORG_NAME = "s_current_user_org_name";
    public static final String SESSION_CURRENT_USER_ROLES = "s_current_user_roles";
    public static final Long ACCESS_TOKEN_EXPIRED = 60 * 60L;
    public static final String LOAN_FINISHED_ID = "Blue-DF-FinishLoanId";
    public static final Long LOAN_FINISHED_WAIT_EXPIRED = 5 * 60L;


    /**
     * 验证码过期时间
     */
    public static final Long CAPTCHA_EXPIRE_TIME = 2 * 60L;

    /**
     * 获取验证码的key
     * @param uuid uuid
     * @return String
     */
    public static String appendCaptchaPrefix(String uuid) {
        return CAPTCHA_PREFIX + uuid;
    }

    /**
     * 获取用户登录key
     * @param username username
     * @return String
     */
    public static String appendSessionPrefix(String username) {
        return SESSION_PREFIX + username.toLowerCase();
    }
}
